state.x77
str(state.x77)

st.x77 <- as.data.frame(state.x77[, c("Murder", "Population", 
                                      "Illiteracy", "Income", "Frost")])
cor(st.x77)

library(car)
cor(st.x77)

scatterplotMatrix(st.x77, spread = FALSE, lty.smooth = 2)
# scatterplotMatrix(st.x77, spread = FALSE, lty.smooth = 2,
#                   main = "Scatter Plot Matrix")

library(corrplot)
corrplot(cor(st.x77))
corrplot.mixed(cor(st.x77))

mt <- mtcars[1:7]

cor(mt)
scatterplotMatrix(mt)

corrplot(cor(mt))

